package cn.maiyar.version.config;

import cn.maiyar.version.handler.ApiRequestMappingHandlerMapping;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * api版本控制配置
 *
 * @author c.c
 */
@Slf4j
@Configuration
public class ApiVersionConfig implements WebMvcRegistrations {

    @Override
    public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
        log.debug("初始化 RequestMappingHandlerMapping!");
        return new ApiRequestMappingHandlerMapping();
    }
}
